import { get, post, put, deleteApi } from '@/utils/api'

export function pageQuery(queryParams) {
    return get('/admin/categories/page', queryParams)
}

export function insert(data) {
    return post('/admin/categories', data)
}

export function update(data) {
    return put('/admin/categories', data)
}

export function deleteData(ids) {
    return deleteApi('/admin/categories', ids)
}

export function categoryEffectiveOptions(level) {
    return get(`/admin/categories/effective/options/${level}`)
}

export function categoryGroupOptions() {
    return get(`/admin/categories/effective/options/goods`)
}